<cfsetting enablecfoutputonly="true">
<cfswitch expression="#thisTag.executionMode#">
	<cfcase value="start">
		<cfparam name="attributes.id" default="">
		<cfparam name="attributes.name" default="">
		<cfparam name="attributes.onClick" default="">
		<cfparam name="attributes.src" default="">
		<cfif StructKeyExists(caller,'root')>
			<cfset root = caller.root>
		<cfelse>
			<cfset root = caller>
		</cfif>
		<cfif NOT thisTag.hasEndTag>
			<cfthrow detail="End tag required" message="All coop tags require an end tag." errorcode="sos.tag.attributes">
		</cfif>
		<cfif attributes.id EQ ''>
			<cfthrow detail="Missing required attribute: 'id'" message="'id' attribute is required">
		</cfif>
		<cfif NOT structKeyExists(root,"coop")>
			<cfthrow detail="Missing required COOP object on calling page.">
		</cfif>
		<cfscript>
		standardAttributes = 'id,name,onClick,src';
		attributes = root.coop.mergeAttributes(attributes,root);
		attributeList = root.coop.createAttributeList(attributes,standardAttributes,root);
		if (attributes.name EQ '') {
			attributes.name = attributes.id;
		}
		</cfscript>
	</cfcase>
	<cfcase value="end">
		<cfsavecontent variable="formElement"><cfoutput><input type="image" src="#attributes.src#" onClick="#attributes.onClick#" name="#attributes.name#" id="#attributes.id#"#attributeList#/></cfoutput></cfsavecontent>
		<cfoutput>#formElement#</cfoutput>
	</cfcase>
</cfswitch>
<cfsetting enablecfoutputonly="false">